/**
 * Created by duwei on 2018/6/4.
 */
var NewCoinShopRecordCellItem = Item.extend({
    _ccsFileName: res.NewCoinShopRecordCellUnit_json,

    /**
     * 设置数据
     * @param index
     * @param data
     * @param clubid
     */
    refreshData: function (index, data, isfangka) {
        cc.log(index, data);
        var self = this;

        if (isfangka) {
            //[{"id":1414,"createTime":"01/12 18:28","cnt":1,"status":1,"orderCode":"5091280344","statusStr":"已支付","totalAmount":0.1,"cmdType":1,"parent_id":"无"}]
            var nameStr=data.cnt+'张房卡'
            self._nodeList['lb_name'].setString(nameStr);
            // self._nodeList['lb_num'].setString(1);
            var price = data.totalAmount+'元';
            self._nodeList['lb_price'].setString(price);
            self._nodeList['lb_time'].setString(data.createTime);
        }
        else {
            self._nodeList['lb_name'].setString(data.name);
            // self._nodeList['lb_num'].setString(1);
            var price = data.price;
            if (data.consumetype == "diamond") {
                price = price + '钻石';
            }
            else if (data.consumetype == "rmb") {
                price = price + '元';
            }
            self._nodeList['lb_price'].setString(price);
            self._nodeList['lb_time'].setString(data.time);
        }


    },

});